/*
 * @Author: 张小平
 * @Date:   2025-05-01 
 * @Email:  qqshuqian@163.com 
 * @Copyright © 2024 aseyun. All rights reserved.
 */
import Layout from '@/framework-core/page/index/index.vue'
import Store from '@/framework-core/store/'
import { hasMobile } from '@/framework-core/utils/util'

export default [{
  path: '/admin',
  // component: () => Store.getters.isMacOs ? import('@/mac/index.vue') : (hasMobile() ? import('@/page/client/mobile.vue') : import('@/page/index/index.vue')),
  component: () => Store.getters.isMacOs ? import('@/framework-core/mac/index.vue') : (hasMobile() ? import('@/framework-core/page/index/index.vue') : import('@/framework-core/page/index/index.vue')),
  redirect: '/admin/index',
  children: [
      //{
  //   path: 'no',
  //   // name: '首页',
  //   meta: {
  //     i18n: 'dashboard'
  //   },
  //   component: () =>
  //       import( /* webpackChunkName: "views" */ '@/views/wel/dashboard.vue')
  // },
    {
      path: 'index',
      name: '',
      meta: {
        i18n: 'dashboard',
        keepAlive: true,
        isTab: false,
        isAuth: true
      },
      component: () =>
          import( /* webpackChunkName: "views" */ '@/framework-core/views/wel/index.vue')
    },
    {
      path: 'no',
      name: '空',
      component: () =>
          import( /* webpackChunkName: "views" */ '@/framework-core/views/wel/no.vue')
    },
    {
      path: 'more',
      name: '控制台',
      meta: {
        i18n: 'more',
        menu: false,
      },
      component: () =>
          import( /* webpackChunkName: "views" */ '@/framework-core/views/wel/dashboard.vue')
    }]
}, {
  path: '/iframe',
  component: Layout,
  redirect: '/iframe',
  children: [{
    path: '',
    name: '',
    component: () =>
      import( /* webpackChunkName: "views" */ '@/framework-core/components/iframe/main.vue')
  }]
}, {
  path: '/info',
  component: Layout,
  redirect: '/info/index',
  children: [{
    path: 'index',
    name: '个人信息',
    meta: {
      i18n: 'info',
      isAuth: true
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '@/framework-core/views/user/info.vue')
  }, {
    path: 'setting',
    name: '个人设置',
    meta: {
      i18n: 'setting',
      isAuth: true
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '@/framework-core/views/user/setting.vue')
  }
    , {
      path: 'notice',
      name: '个人消息',
      meta: {
        i18n: 'notice',
        isAuth: true
      },
      component: () =>
          import( /* webpackChunkName: "views" */ '@/framework-core/views/user/notice.vue')
    }
  ]
},
 {
    path: '/detail/create',
    component: Layout,
    children: [{
      path: '',
      name: (query) => {
        return query.id ? "编辑页面" : "新增页面";
      },
      meta: {
        activeMenu: '/detail'
      },
      component: () =>
          import( /* webpackChunkName: "views" */ '@/framework-core/views/util/detail.vue'),
    }]
  }]
